package cn.edu.cdcas.mapper;

import cn.edu.cdcas.entity.Answer;
import cn.edu.cdcas.entity.Question;
import cn.edu.cdcas.entity.Student;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface AnswerMapper {

    // 批量插入
    void insertBatch(@Param("list") List<Question> questions, @Param("student") Student student,
                     @Param("type") int type);

    Answer getById(@Param("id") Integer id);

    void update(@Param("a") Answer answer);

    int totalScore(@Param("student") Student student, @Param("type") int type);

    void delete(@Param("id") Integer id);
}
